package com.seadragon.apps.doctorcard.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import com.seadragon.apps.doctorcard.model.Chat;
import com.seadragon.apps.doctorcard.model.ChatContact;
import com.seadragon.apps.doctorcard.model.Contact;

public interface ChatContactRepository extends JpaRepository<ChatContact, Long> {
	Page<ChatContact> findByChatOrderByDateJoinedAsc(Chat chat, Pageable pageable);
	List<ChatContact> findByChat(Chat chat);
	List<ChatContact> findByContact(Contact contact);
	ChatContact findByChatAndContact(Chat chat, Contact contact);
}